/*==================================================
  IMPROMPTU - PRACTICE PAGE
==================================================*/

/*==============================
  PAGE LAYOUT
==============================*/

.main{
    padding:40px;
    overflow-y:auto;
}

.practice-header{
    margin-bottom:30px;
}

.practice-header .badge{
    display:inline-block;
    background:#eef2ff;
    color:#2563eb;
    padding:8px 18px;
    border-radius:999px;
    font-size:14px;
    font-weight:600;
}

.practice-header h1{
    font-size:40px;
    margin:18px 0 10px;
    color:#111827;
}

.practice-header p{
    font-size:17px;
    color:#6b7280;
    max-width:700px;
    line-height:1.6;
}

/*==============================
  LIVE STUDIO
==============================*/

.studio-card{
    background:#ffffff;
    border-radius:22px;
    padding:30px;
    box-shadow:0 18px 40px rgba(15,23,42,.08);
    margin-bottom:35px;
}

.studio-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

.studio-header h2{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:28px;
    color:#111827;
}

.studio-header p{
    margin-top:8px;
    color:#6b7280;
    font-size:15px;
}

/*==============================
  RECORD STATUS
==============================*/

.recording-status{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 18px;
    background:#ecfdf5;
    border-radius:999px;
    color:#16a34a;
    font-weight:700;
}

.record-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#ef4444;
    animation:pulse 1s infinite;
}

@keyframes pulse{
    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.4);
    }

    100%{
        transform:scale(1);
    }
}

/*==============================
  CAMERA
==============================*/

.camera-wrapper{
    position:relative;
    width:100%;
    height:560px;
    border-radius:20px;
    overflow:hidden;
    background:#0f172a;
    display:flex;
    justify-content:center;
    align-items:center;
}

#camera{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.camera-placeholder{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    color:#ffffff;
    gap:18px;
    text-align:center;
    background:#111827;
}

.camera-placeholder i{
    font-size:72px;
}

.camera-placeholder h2{
    font-size:34px;
}

.camera-placeholder p{
    font-size:16px;
    color:#d1d5db;
    max-width:420px;
    line-height:1.6;
}

/*==============================
  CAMERA OVERLAY
==============================*/

.camera-overlay{
    position:absolute;
    left:30px;
    right:30px;
    bottom:25px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.recording-pill{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px 22px;
    background:rgba(239,68,68,.95);
    color:#ffffff;
    border-radius:999px;
    font-weight:700;
    backdrop-filter:blur(10px);
}

#timer{
    padding:12px 24px;
    background:rgba(17,24,39,.65);
    color:#ffffff;
    border-radius:999px;
    font-size:22px;
    font-weight:700;
    backdrop-filter:blur(10px);
}

/*==============================
  CONTROLS
==============================*/

.recording-controls{
    display:flex;
    justify-content:center;
    gap:18px;
    flex-wrap:wrap;
    margin-top:28px;
}

.recording-controls button{
    min-width:170px;
}

.secondary-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    background:#ffffff;
    color:#2563eb;
    border:2px solid #2563eb;
    padding:14px 22px;
    border-radius:12px;
    font-size:15px;
    font-weight:700;
    font-family:"Inter",sans-serif;
    cursor:pointer;
    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}

.secondary-btn:hover{
    background:#2563eb;
    color:#ffffff;
    transform:translateY(-2px);
    box-shadow:0 10px 22px rgba(37,99,235,.22);
}

.secondary-btn:active{
    transform:translateY(0);
}

.secondary-btn:disabled{
    opacity:.5;
    cursor:not-allowed;
    transform:none;
    box-shadow:none;
}

/*==============================
  BOTTOM GRID
==============================*/

.bottom-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
    margin-bottom:40px;
}

/*==============================
  CARDS
==============================*/

.practice-card{
    background:#ffffff;
    border-radius:22px;
    padding:30px;
    box-shadow:0 15px 35px rgba(15,23,42,.08);
}

.card-header{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:25px;
}

.card-header i{
    width:52px;
    height:52px;
    border-radius:14px;
    background:#2563eb;
    color:#ffffff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:20px;
}

.card-header h2{
    font-size:26px;
    color:#111827;
}

/*==============================
  FORM ELEMENTS
==============================*/

.practice-card p{
    color:#6b7280;
    line-height:1.6;
    margin-bottom:20px;
}

.form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:22px;
}

.form-group label{
    font-size:15px;
    font-weight:600;
    color:#374151;
    margin-bottom:8px;
}

.form-group input,
.form-group textarea,
.form-group select{
    width:100%;
    padding:14px 16px;
    border:1px solid #d1d5db;
    border-radius:12px;
    font-size:15px;
    font-family:inherit;
    transition:.25s;
    background:#ffffff;
}

.form-group textarea{
    resize:vertical;
    min-height:180px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.form-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

/*==============================
  UPLOAD BOX
==============================*/

.upload-box{
    border:2px dashed #bfdbfe;
    border-radius:20px;
    padding:38px 30px;
    text-align:center;
    transition:
        border-color .25s ease,
        background .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
    background:linear-gradient(
        180deg,
        #f8fbff 0%,
        #f8fafc 100%
    );
    cursor:pointer;
}

.upload-box:hover{
    border-color:#2563eb;
    background:#eff6ff;
    transform:translateY(-2px);
    box-shadow:0 14px 28px rgba(37,99,235,.1);
}

.upload-box i{
    font-size:46px;
    color:#2563eb;
    margin-bottom:15px;
}

.upload-box h3{
    margin-bottom:10px;
    color:#111827;
    font-size:20px;
}

.upload-box p{
    color:#6b7280;
    margin-bottom:20px;
}

/*==============================
  VIDEO FILE INPUT
==============================*/

#videoUpload{
    width:100%;
    max-width:450px;
    padding:8px;
    border:none;
    background:transparent;
    color:#64748b;
    font-family:"Inter",sans-serif;
    font-size:14px;
    cursor:pointer;
}

#videoUpload::file-selector-button{
    margin-right:14px;
    padding:12px 20px;
    border:2px solid #2563eb;
    border-radius:12px;
    background:#ffffff;
    color:#2563eb;
    font-family:"Inter",sans-serif;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(37,99,235,.12);
    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

#videoUpload::file-selector-button:hover{
    background:#2563eb;
    color:#ffffff;
    transform:translateY(-1px);
    box-shadow:0 10px 22px rgba(37,99,235,.22);
}

/* Safari support */

#videoUpload::-webkit-file-upload-button{
    margin-right:14px;
    padding:12px 20px;
    border:2px solid #2563eb;
    border-radius:12px;
    background:#ffffff;
    color:#2563eb;
    font-family:"Inter",sans-serif;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

/*==============================
  BUTTONS
==============================*/

.primary-btn{
    width:100%;
    margin-top:10px;
}

/*==============================
  ANALYZE SPEECH BUTTON
==============================*/

.analyze-btn{
    width:100%;
    margin-top:22px;
    min-height:54px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:15px 28px;
    border:2px solid #2563eb;
    border-radius:14px;
    background:linear-gradient(
        135deg,
        #2563eb 0%,
        #4f46e5 55%,
        #4338ca 100%
    );
    color:#ffffff;
    font-family:"Inter",sans-serif;
    font-size:16px;
    font-weight:800;
    letter-spacing:.1px;
    cursor:pointer;
    box-shadow:
        0 12px 28px rgba(37,99,235,.28),
        inset 0 1px 0 rgba(255,255,255,.18);
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}

.analyze-btn i{
    font-size:17px;
}

.analyze-btn:hover{
    transform:translateY(-3px);
    box-shadow:
        0 18px 34px rgba(37,99,235,.36),
        inset 0 1px 0 rgba(255,255,255,.2);
    filter:brightness(1.04);
}

.analyze-btn:active{
    transform:translateY(-1px);
    box-shadow:0 9px 20px rgba(37,99,235,.25);
}

.analyze-btn:focus-visible{
    outline:none;
    box-shadow:
        0 0 0 4px rgba(37,99,235,.2),
        0 14px 30px rgba(37,99,235,.3);
}

.analyze-btn:disabled{
    cursor:not-allowed;
    opacity:.7;
    transform:none;
    filter:none;
    box-shadow:0 8px 18px rgba(37,99,235,.18);
}

/*==============================
  GENERATED PROMPT
==============================*/

.generated-prompt{
    margin-top:30px;
    padding:25px;
    border-radius:18px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
}

.generated-prompt h3{
    display:flex;
    align-items:center;
    gap:10px;
    color:#111827;
    margin-bottom:18px;
}

.generated-prompt h3 i{
    color:#f59e0b;
}

#generatedPromptText{
    min-height:180px;
    padding:18px;
    border-radius:14px;
    background:#ffffff;
    border:1px solid #e5e7eb;
    color:#6b7280;
    line-height:1.7;
}

/*==============================
  AI FEEDBACK
==============================*/

.feedback-section{
    margin-bottom:60px;
}

.feedback-card{
    background:#ffffff;
    border-radius:22px;
    padding:35px;
    box-shadow:0 18px 40px rgba(15,23,42,.08);
}

.feedback-description{
    color:#6b7280;
    margin:15px 0 30px;
    line-height:1.7;
}

.feedback-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.feedback-box{
    background:#f8fafc;
    border-radius:18px;
    padding:28px;
    text-align:center;
    transition:.25s;
    border:1px solid transparent;
}

.feedback-box:hover{
    transform:translateY(-5px);
    border-color:#dbeafe;
    box-shadow:0 12px 25px rgba(37,99,235,.08);
}

.feedback-box i{
    font-size:30px;
    color:#2563eb;
    margin-bottom:15px;
}

.feedback-box h3{
    font-size:16px;
    color:#111827;
    margin-bottom:12px;
}

.feedback-box span{
    font-size:18px;
    font-weight:700;
    color:#2563eb;
}

/*==============================
  RESPONSIVE
==============================*/

@media(max-width:1200px){

    .bottom-grid{
        grid-template-columns:1fr;
    }

    .feedback-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:900px){

    .studio-header{
        flex-direction:column;
        align-items:flex-start;
        gap:20px;
    }

    .camera-wrapper{
        height:420px;
    }

    .recording-controls{
        flex-direction:column;
    }

    .recording-controls button{
        width:100%;
    }
}

@media(max-width:768px){

    .main{
        padding:20px;
    }

    .practice-header h1{
        font-size:32px;
    }

    .camera-wrapper{
        height:320px;
    }

    .camera-placeholder h2{
        font-size:24px;
    }

    .camera-placeholder i{
        font-size:52px;
    }

    .camera-overlay{
        left:15px;
        right:15px;
        bottom:15px;
    }

    #timer{
        font-size:18px;
        padding:10px 18px;
    }

    .recording-pill{
        padding:10px 18px;
    }

    .form-row{
        grid-template-columns:1fr;
    }

    .feedback-grid{
        grid-template-columns:1fr;
    }

    .upload-box{
        padding:30px 20px;
    }

    #videoUpload{
        max-width:100%;
    }
}

@media(max-width:500px){

    .studio-card,
    .practice-card,
    .feedback-card{
        padding:20px;
    }

    .card-header{
        flex-direction:column;
        text-align:center;
    }

    .analyze-btn{
        font-size:15px;
        padding:14px 18px;
    }

    #videoUpload::file-selector-button{
        display:block;
        width:100%;
        margin:0 0 12px;
    }

    #videoUpload::-webkit-file-upload-button{
        display:block;
        width:100%;
        margin:0 0 12px;
    }
}